package week6;

public class PP0806 {
    public static void main(String[] args) {
        Account acct1 = new Account("Ted Murphy",1);
        Account acct2 = new Account("Jane Smith", 2);

        AccountX acct = new AccountX();

        acct.addCustomer(acct1);
        acct.addCustomer(acct2);
        acct.deposit(0, 999999);
        acct.deposit(1, 1000);
        acct.deposit(2, 500);
        System.out.println("银行行长有" + acct.getBalance(0) + "元");
        System.out.println("Ted Myrphy有" + acct.getBalance(1) + "元");
        System.out.println("Jane Smith有" + acct.getBalance(2) + "元");

        acct.withdraw(0, 50000, 0);
        acct.withdraw(2, 500, 1);
        acct.withdraw(1, 100,1);

        System.out.println("银行行长有" + acct.getBalance(0) + "元");
        System.out.println("Ted Myrphy有" + acct.getBalance(1) + "元");
        System.out.println("Jane Smith有" + acct.getBalance(2) + "元");

        acct.addRate();
        double RATE = acct.getRate();
        System.out.println("当前利率：" + RATE);
    }
}
